package com.xzy.service.impl;

import com.xzy.entity.Department;
import com.xzy.mapper.DepartmentMapper;
import com.xzy.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DepartmentServiceImpl implements DepartmentService {
    @Autowired
    private DepartmentMapper departmentMapper;

    @Override
    public Department getDepartment(int departmentId) {
        return departmentMapper.getDepartment(departmentId);
    }

    @Override
    public Department getDepartmentByName(String departmentName) {
        return departmentMapper.getDepartmentByName(departmentName);
    }
}
